<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>Table</title>
		
	</head>
	<body>
		<form class="layui-form">
			<div class="layui-form-item">
				<label class="layui-form-label">用户名</label>
				<div class="layui-input-block">
					<input type="text" name="" id="username" placeholder="请输入" autocomplete="off" class="layui-input">
				</div>
				<label class="layui-form-label">密码</label>
				<div class="layui-input-block">
					<input type="text" name="" id="password" placeholder="请输入" autocomplete="off" class="layui-input">
				</div>
				<label class="layui-form-label">年龄</label>
				<div class="layui-input-block">
					<input type="text" name="" id="age" placeholder="请输入" autocomplete="off" class="layui-input">
				</div>
			</div>
			<div class="layui-form-item">
				<div class="layui-input-block">
					<button class="layui-btn" id="submit">确定</button>
					<button type="reset" class="layui-btn layui-btn-primary">重置</button>
				</div>
			</div>
		</form>
		
		<script type="text/javascript" src="common/js/jquery/jquery.min.js"></script>
		<script type="text/javascript">
			$(function(){
				alert('111111')
			});
			
			$("#submit").bind("click",function(){
				$.ajax({
					type: "POST",
					url: "../user/addUser.do",
					data: "name=John&location=Boston",
					success: function(msg){
							console.log(msg);
							//alert( "receive data:" + msg );
						}
				});
			});
		</script>
	</body>
</html>